Enum ProtectionType

java.lang.Object
java.lang.Enum<ProtectionType>
com.seclore.fs.helper.enums.ProtectionType
All Implemented Interfaces:
Serializable, Comparable<ProtectionType>, java.lang.constant.Constable

public enum ProtectionType extends Enum<ProtectionType>
This Enum represents the protection type supported by fs helper library.
  • Enum Constant Details

    • PROTECT

      public static final ProtectionType PROTECT
      Protect the file with specific details. All the information such as Classification, Credential(Policy), Access Rights will be required to protect the file. Following defines the structure of protection details XML for this ProtectioType:
       
       <protection-details>
       
       	<!-- Classification to be applied on the document. -->
       	<classification>
       		<!-- Unique Identifier of the classification. -->
       		<id/>
       	</classification>
       
       	<!-- Access Rights to be mapped to the file. -->
       	<file-access-right-mappings>
       		<!-- There can be multiple occurrences of <file-access-right-mapping> -->
       		<file-access-right-mapping>
       			<!-- Action specifies if access right is being mapped or unmapped.
       				possible values :
       				1 : Map this access right
       				0 : Un-map this access right 
       			-->
       			<action>1</action>
       
       			<access-right>
       
       				<entity>
       					<!-- Unique Identifier of the user in the Repository  -->
       					<id/>
       					<!-- This is a unique identifier of the Repository in which the user exist. -->
       					<rep-code/>
       					<!-- Type of entity.
       						1 : User
       						2 : Group. 
       					-->
       					<type/>
       				</entity>
       
       				<!-- Primary access right for entity.
       				Following are valid values for primary access right:
       				
       				Hex value	: Dec value : AccessRight
       				=====================================
       				0x00000002	: 2         : Read
       				0x00000006	: 6         : Lite Viewer
       				0x0000000A	: 10        : Print 
       				0x00000022	: 34        : Edit 
       				0x000000AA	: 170       : Full  Control 
       				0x00000102	: 258       : Copy Data 
       				0x00000202	: 514       : Screen Capture 
       				0x00000402	: 1026      : Macro
       				
       				To specify multiple access rights, like edit and print, do bitwise OR on the rights
       				Print+Edit = Print OR Edit
       				Copy Data + Print= Copy Data OR Print
       				Decimal value is expected
       				-->
       				<primary-access-right/>
       				
       				<!--Indicates whether user has offline access or not. 
       					0: User doesn't have offline access.
       					1: User has offline access.
       				-->
       				<offline></offline>
       				
       				<!-- Indicates whether user has access to redistribute (Share) document.
       					0: User doesn't have permission to redistribute (Share) document.
       					1: User has permission to redistribute document.
       				-->
       				<redistribute></redistribute>
       			</access-right>
       		</file-access-right-mapping>
       	</file-access-right-mappings>
       </protection-details>
       
       
       
    • PROTECT_WITH_HF

      public static final ProtectionType PROTECT_WITH_HF
      Protect using identifier of HotFolder. Following defines the structure of protection details XML for this ProtectioType:
                 
      	   <hot-folder>
      	       <!-- Unique identifier of the HotFolder. -->
      	       <id/>
      	   </hot-folder>
      	   
                 
    • PROTECT_WITH_FILE_ID

      public static final ProtectionType PROTECT_WITH_FILE_ID
      Protect using identifier of already protected file.
    • PROTECT_WITH_HF_EXT_REF

      public static final ProtectionType PROTECT_WITH_HF_EXT_REF
      Protect using external identifier of protected File and HotFolder. Following defines the structure of protection details XML for this ProtectioType:
       
       <hot-folder-extn-reference>
       	<!-- External reference details for the HotFolder. -->
       	<extn-reference>
       		<!-- External ref id represents by third pary integrated the system. -->
       		<extn-ref-id />
       		<!-- Extenral ref name represents by third pary integrated the system. -->
       		<extn-ref-name />
       		<!-- External ref date represents by third pary integrated the system. -->
       		<extn-ref-data />
       		<!-- General description of the external application that is communicating with FileSecure Policy Server. --> 
       		<extn-app-id />
      	</extn-reference>
       </hot-folder-extn-reference>
       
       
  • Method Details

    • values

      public static ProtectionType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ProtectionType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getType

      public int getType()
      Returns:
      The Type of protection used to protect a file.
    • getRequestType

      public int getRequestType()
      Returns:
      The request id used to protect for protection type.